<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>优惠列表</title>
<link rel="stylesheet" type="text/css" href="../img/base.css">
<script language="javascript" src="../img/jquery.js"></script>
<script language="javascript" src="../js/WdatePicker.js"></script>
<script type="text/javascript">
	function selectAll(){
		var tof = $('#all_number').attr('checked');
		if(tof) $("input[name='number[]']:checkbox").attr('checked','checked');
		else $("input[name='number[]']:checkbox").attr('checked','');
	}
	
	function numberDisable(){
		var number_arr = $("input[name='number[]']:checked");
		if(number_arr.length > 0){
			return true;
		}else{
			alert('请选择要操作的优惠券');
			return false;	
		}	
	}
	function del_batch(batch_id){
		
		var confirm_del = window.confirm("确定删除?");
		if(confirm_del)
		{
			window.location = "coupon_batch.php?op=delete&batch_id="+batch_id;
		}
		//
	}
</script>
</head>
<body leftmargin="8" topmargin="8" background='../img/allbg.gif'>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" align="center">
	<tr>
		<td align='center' valign='top'>
        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
            	<tr>
                	<td height="28" background="../img/tbg.gif">
                    	<div style="float:right;padding-right:6px;">
                            <a href='coupon_batch.php?op=add' class='np coolbg'>添加优惠批次</a> &nbsp;&nbsp;
                            <input type='button' class="coolbg np" onClick="location='coupon.php';" value='返回' />
                        </div>
                    </td>
                </tr>
            </table>
			
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr bgcolor="#FFFFFF">
                	<td height="4"></td>
                </tr>
			</table>
			<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA">
				<tr bgcolor="#E7E7E7">
					<td height="24" colspan="5" background="../img/tbg.gif">§优惠管理 &gt; 优惠批次列表 &nbsp;</td>
				</tr>
                <tr align="center" bgcolor="#FAFAF1" height="22">
                    <td width="5%">批次编号</td>
                    <td width="15%">批次名称</td>
                    <td width="15%">添加人</td>
                    <td>备注</td>
                    <td width="10%">操作</td>
                </tr>
                <{foreach from=$coupon_batch_list item=batch}>
                <tr align='center' bgcolor="#FFFFFF"  onMouseMove="javascript:this.bgColor='#f4fbf4';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
                    <td><{$batch.batch_id}></td>
                    <td><{$batch.batch_name}></td>
                    <td><{$batch.real_name}></td>
                    <td><{$batch.batch_remark}></td>
                    <td>
                    	<a href="coupon_batch.php?op=update&batch_id=<{$batch.batch_id}>">修改</a>&nbsp;
                        <a href="coupon_scope.php?batch_id=<{$batch.batch_id}>">范围</a>&nbsp;
                    	<a href="javascript:;" onClick="del_batch(<{$batch.batch_id}>);">删除</a>
                    </td>
                </tr>
                <{/foreach}>
                <tr bgcolor="#FAFAF1">
                	<td height="24" colspan="5"><{$page_str}></td>
                </tr>
                <!--<tr align="right" bgcolor="#EEF4EA">
                	<td height="20" colspan="9" align="center"></td>
                </tr>-->
			</table>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                	<td height="4"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                	<td height="26"></td>
                </tr>
				<tr>
					<td colspan="2" height="4"></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</body>
</html>